void *.
catch( ... )means to catch all exceptions.
throw;
int g( float h ) throw ( a, b, c )It is possible to restrict the exception types thrown from a function. The exception types are specified in the function declaration as an exception specification (also called a throw list). The exception specification lists the exceptions that may be thrown. A function may throw the indicated exceptions or derived types.{
// function body
}
void g(); // this function can throw any exception
double *ptr = new( nothrow ) double[ 5000000 ];The preceding statement indicates that the version of new that does not throw bad_alloc exceptions (i.e., nothrow) should be used to allocate an array of 5,000,000 double values.
auto_ptr< Integer > ptrToInteger( new Integer( 7 ) );
ptrToInteger->setInteger( 99 );uses the auto_ptr overloaded -> operator and the function call operator () to call function setInteger on the Integer object pointed to by ptrToInteger.
( *ptrToInteger ).getInteger()in line 30 uses the auto_ptr overloaded * operator to dereference ptrToInteger then uses the dot (.) operator
throw;Where would you normally expect to find such a statement? What if that statement appeared in a different part of a program?
catch(...) { throw; }